package com.kingdee.eas.hr.quali.handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.base.permission.UserFactory;
import com.kingdee.eas.base.permission.UserInfo;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.eas.hr.quali.QualificationApplyBillFactory;
import com.kingdee.eas.hr.quali.QualificationApplyBillInfo;
import com.kingdee.eas.hr.quali.QualificationsStandardFactory;
import com.kingdee.eas.hr.quali.QualificationsStandardInfo;
import com.kingdee.shr.base.syssetting.context.SHRContext;
import com.kingdee.shr.base.syssetting.exception.SHRWebException;
import com.kingdee.shr.base.syssetting.web.handler.EditHandler;

public class MyApplyGridEditHandler extends EditHandler {

	@Override
	protected void afterInitModel(HttpServletRequest request,
			HttpServletResponse response, CoreBaseInfo coreBaseInfo)
			throws SHRWebException {
		super.afterInitModel(request, response, coreBaseInfo);
		Context ctx = SHRContext.getInstance().getContext();
		try {
			QualificationApplyBillInfo info = (QualificationApplyBillInfo) coreBaseInfo;
			info = QualificationApplyBillFactory
					.getLocalInstance(ctx)
					.getQualificationApplyBillInfo(
							"select quaStandard.name,quaLevel.name where id = '"
									+ String.valueOf(info.getId())
									+ "'");
			coreBaseInfo.put("name", info.getQuaStandard().getName() + "/"
					+ info.getQuaLevel().getName());
		} catch (BOSException e) {
			e.printStackTrace();
		} catch (EASBizException e) {
			e.printStackTrace();
		}
	}

}
